On the Subject of The Red Cipher

Seeing red is the standard for this module.

On the module, you will see 3 screens, a keyboard, 2 arrows, and a submit button that displays the current page you’re on.

Pressing the right arrow takes you to the next page. Pressing the left arrow takes you to the previous page. There is a total of 2 pages.

On page 1, the top screen shows a 6 letter encrypted word, the middle screen shows a 6 letter string. If the encrypted word has any Js, replace each J with the letter in the same position as the string in the middle screen. After you do all 3 steps, change the letter(s) back into a J.

On page 2, all 3 screens show a word. The top screen will be referred to as KW1, the middle screen will be called KW2, and finally the bottom screen will be KW3.

Take the encrypted word and follow the mechanics down below:

Step 1: Playfair Cipher

For this step use KW1 to create the 1st matrix.

To create it, first replace any Js with Is, and remove any duplicate letters from the keyword (keep each letter’s first occurrence). Then take the alphabet and remove any occurrences of all the letters in your current key.

If the first digit of the serial number is odd, place the alphabet at the end of your key. Otherwise place the alphabet at the beginning of your key.

Once you have the 25 length string, create a 5×5 matrix of letters.

Split the encrypted word into character pairs. For each pair:

  • If the 2 letters are exactly the same, keep them as is.
  • Otherwise, if the letters appear on the same row of your matrix, replace them with the letters to their immediate left respectively, wrapping around to the right side of the row.
  • Otherwise, if the letters are on the same column of your matrix, replace them with the letters immediately above, wrapping to the bottom.
  • Otherwise, replace each of them with the letter on the same row but in the column of the other letter in the original pair.

The resulting letters forms your new encrypted word.

Example

Encrypted Word: PXVEYW
Key 1: ACDFGHIKMPQRTUVWXYZNOBLES

ACDFG
HIKMP
QRTUV
WXYZN
OBLES

PX -> IN
VE -> US
YW -> XN
New Encrypted Word: INUSXN

Step 2: Conjugated Matrix Bifid

This step requires 2 matrices. The first matrix that will be used is the one you made in step 1. The second matrix will be created using KW2.

Do the same thing as you did to create the 1st matrix, replace any Js with Is in KW2, remove all duplicates (keeping each letter’s first occurrence), take the alphabet and remove any occurrences of all the letters in KW2.

If the second digit of the serial number is even, add the alphabet to the end of KW2. Otherwise, add it to the beginning of KW2.

Finally take your 25 length string and create a 5×5 matrix of letters.

You should now have 2 matrices. Add numbers 1–5 along the top, left, and right of the 2 matrices.

Using the encrypted word, for each letter, find it in the 2nd matrix to get a row/col pair from it to get 6 pairs of numbers. Then take the 4th - 6th pairs of numbers and place them under the 1st - 3rd pairs of numbers. Finally read the numbers top to bottom, left to right to get 6 new pairs of numbers. Use these numbers for the row/col in 1st matrix to get a new encrypted word.

Example

Encrypted Word: INUSXN
Key 2: GALONBCDEFHIKMPQRSTUVWXYZ

12345|12345
1ACDFG|GALON1
2HIKMP|BCDEF2
3QRTUV|HIKMP3
4WXYZN|QRSTU4
5OBLES|VWXYZ5

I -> 32
N -> 15
U -> 45
S -> 43
X -> 53
N -> 15

321545
435315

34 -> U
23 -> K
15 -> G
53 -> L
41 -> W
55 -> S
New Encrypted Word: UKGLWS

Step 3: Tri-square Cipher

This step requires 3 matrices. The 1st and 2nd matrices are the ones you already created. Create the 3rd using the same methods you did for matrix 1 and 2 except using KW3.

If the last digit of the serial number is odd, add the alphabet to the end of KW3. Otherwise, add it to the beginning of KW3.

Rearrange the new 25 length string into another 5×5 matrix. You should now have 3 matrices.

Split the encrypted word into 3 letter pairs. For each letter pair, do the following:

  • Take the first letter and find it in the 3rd matrix. The row will be the row for the 1st matrix, and the column will be the column of the 2nd matrix.
  • Next find the second letter in the 3rd matrix. The row will be the row for the 2nd matrix, and the column will be the column of the 1st matrix.
  • Finally, take the letter you got from the 1st matrix as your first letter, and the letter you got from the 2nd matrix as your second letter.

Remember to replace any letters that were Js initially to a J to get your deciphered word.

Example

Encrypted Word: UKGLWS
Key 3: IUNKABCDEFGHLMOPQRSTVWXYZ

ACDFG|GALON|IUNKA
HIKMP|BCDEF|BCDEF
QRTUV|HIKMP|GHLMO
WXYZN|QRSTU|PQRST
OBLES|VWXYZ|VWXYZ

UK -> FA
GL -> TH
WS -> ER
Decrypted Word: FATHER

Once you finally have your decrypted word, you can submit it. Once you start typing, all the screens will go black and the bottom screen will show what you are typing.

To clear it, just click one of the arrows. This goes to one of the pages and clears any input you put in. It will not let you go over 6 letters on input.

Once you are satisfied with your input, press the button labeled "SUB" to submit your answer. On a strike, the module will go back to the first page of the module, but it does not regenerate.